<%@ page import="java.util.Date" %>

<%@ page import="java.security.Timestamp" %>
<%@ page import="org.apache.commons.fileupload.servlet.ServletFileUpload" %>
<%@ page import="java.io.File" %>
<%@ page import="org.apache.commons.fileupload.FileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import="org.apache.commons.fileupload.FileItem" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="cn.entity.News1" %><%--
  Created by IntelliJ IDEA.
  User: 31052
  Date: 2022/4/7
  Time: 15:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
                //接收数据
                request.setCharacterEncoding("utf-8");
                String id = request.getParameter("id");
                String categoryid=request.getParameter("categoryid");
                String title = request.getParameter("title");
                String picPath=request.getParameter("picPath");

                News1 news = new News1();
                news.setId(Integer.parseInt(id));
                news.setCategoryId(Integer.parseInt(categoryid));
                news.setTitle(title);
                news.setPicPath(picPath);
                session.setAttribute("news",news);
        %>
        <form action="Chuan.jsp" method="post" enctype="multipart/form-data">
            图片名称:<input type="text" name="picPath1" value="">
            图片路径：<input type="file" name="picpath" value="" />
            <input type="submit" value="上传">
        </form>
</body>
</html>
